package com.example.demo.controller;

import com.example.demo.annotation.IgnoreAuth;
import com.example.demo.annotation.LoginUserId;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ControllerTest {

    @GetMapping("/api/test")
    public String api(@LoginUserId Long userId){
       if(true){
           throw new RuntimeException("no one is sb");
       }
        return "this is api userId is " + userId;
    }

    @GetMapping("/admin/test")
    public String admin(){
        return "this is admin";
    }

}
